# coding: utf-8
# @Time    : 2023/3/6 09:06
# @Author  : gongshuangxi
# @Email   : sxgong@topdatasec.com

import sys
from apps import tdsapp
import warnings
warnings.filterwarnings("ignore")

try:
    # python2
    reload(sys)
    sys.setdefaultencoding('utf-8')
except:
    # python3
    pass

app = tdsapp.create_app()

if __name__ == '__main__':
    helper = '''
Usage: python main.py [app]
    '''
    argc = len(sys.argv)
    if argc != 2:
        print(helper)
        sys.exit()

    if sys.argv[1] not in ['app']:
        print(helper)
        sys.exit()

    if sys.argv[1] == 'app':
        print("start app")
        tdsapp.start_app(app)

